<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <script src="../vue.js"></script>
  </head>

  <body>
    <div id="app">
      <div @click="show1">
        <a href="atguigu" @click.prevent="show(10)">guigu</a>
      </div>
      <button @click.once="show1">一次性按钮</button>
    </div>
    <script>
      const vm = new Vue({
        el: "#app",
        data() {
          return {};
        },
        methods: {
          show(a) {
            alert(a);
          },
          show1() {
            alert(1);
          },
        },
      });
    </script>
  </body>
</html>
